using UnityEngine;
using System.Collections;

public class Exit : MonoBehaviour 
{
    public Transform nextSpawn;
    public Transform player;

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            Debug.Log("PLAYER");
            player.transform.position = nextSpawn.position;
        }
    }
}
